package com.qsmx.store.app.util;

public class ClickUtil {

    public static final int DELAY = 1000;
    private static long lastClickTime = 0;

    public static final int DELAY2 = 2000;
    private static long lastClickTime2 = 0;

    public static boolean isNotFastClick() {
        long currentTime = System.currentTimeMillis();
        if (currentTime - lastClickTime > DELAY) {
            lastClickTime = currentTime;
            return true;
        } else {
            return false;
        }
    }

    public static void setLastClickTime() {
        lastClickTime = 0;
    }

    public static boolean isNotFastClick2() {
        long currentTime = System.currentTimeMillis();
        if (currentTime - lastClickTime2 > DELAY2) {
            lastClickTime2 = currentTime;
            return true;
        } else {
            return false;
        }
    }

}